1. Field of the Invention
The invention relates to a circuit for sensing both a current and a voltage.
It is known to sense a voltage and a current by using different circuits. One of the circuits receives the voltage, the other circuit receives the current. An integrated circuit which comprises both circuits needs two terminals to be able to sense the voltage and a current separately. As the cost of the integrated circuit depends on the amount of terminals needed, it is a drawback of the known integrated circuit that two terminals have to be used.
2. Description of The Related Art
It is an object of the invention to perform both an accurate current and voltage sensing at the same terminal of an integrated circuit.
A first aspect of the invention provides a circuit for sensing both a current and a voltage level at one input terminal of an integrated circuit.
A second aspect of the invention provides a power supply comprising such a circuit for sensing both a current and a voltage at one input terminal of an integrated circuit.
A current mirror input and a voltage-sensing circuit are both coupled to the same input terminal. The input of the current mirror has a threshold voltage which, in the case of a conventional two-transistor current mirror, is caused by the input transistor. The threshold voltage is the base-emitter voltage of a bipolar input transistor, or the gate source-threshold voltage of a field effect input transistor. The threshold voltage may be increased by using more than one input transistor arranged in series, or by supplying a reference voltage to the emitter or source of the input transistor. The threshold voltage may be defined with respect to a ground terminal (in the case of a npn input transistor) or with respect to another supply terminal (in the case of a pnp input transistor).
The current mirror will be inactive if the voltage at the input terminal does not exceed the threshold voltage of the input of the current mirror. In this situation, the current mirror has a very high input impedance and the voltage at the input terminal is free to vary. The voltage-sensing circuit supplies a voltage level indication which has a value corresponding to the voltage at the input terminal.
The current mirror will be active if the voltage at the input terminal exceeds the threshold voltage. Now, the voltage at the input of the current mirror will be substantially constant and, consequently, the voltage-sensing circuit cannot sense any voltage variations. The active current mirror mirrors the input current supplied to the input terminal to obtain an output current which has a fixed relation with the input current.
EP-A-0585789 discloses a three-terminal switched-mode power supply integrated circuit with one terminal which accepts a combination of a feedback signal and a supply voltage to operate the chip. Inside the chip, a feedback extraction circuit separates the feedback signal from the power supply voltage by sensing the excess current flowing through a shunt regulator. The IC comprises an error amplifier which compares a tapped voltage on the terminal with a band-gap reference voltage. The output of the error amplifier drives a shunt transistor. As long as a sufficient supply current is fed to the terminal, the voltage on the terminal will be stabilized and any excess current will be shunted to ground. This excess current is mirrored and converted into an extracted feedback voltage. The error amplifier of the prior art senses the voltage at the terminal to stabilize this voltage at a desired value, such that it can be used as a supply voltage for the IC. The value of the stabilized voltage has to be chosen above the threshold of the input of the current mirror to be able to measure an excess current at this stabilized voltage. The error amplifier thus senses the voltage at the terminal in a voltage range in which the current mirror draws current. Thus, in this voltage range, the current mirror does not have a high input impedance. Consequently, the prior art circuit does not sense the voltage at the terminal within a certain range in which the current mirror is inactive (and the current mirror has a high input impedance) to supply a voltage level indication dependent on the sensed voltage in this range.
To further elaborate on the difference between the prior art and the invention, a practical application in a power supply will be described below. The prior art uses the same terminal of the IC to receive both the power supply voltage of the IC and feedback information for regulating the power supply. The invention uses the same terminal to receive an input voltage from a winding of the power supply transformer via an impedance. As long as the input voltage at the input terminal is below the threshold voltage of the current mirror, the circuit according to the invention can detect whether the input voltage crosses a predetermined voltage level. This detection can be used to generate a demagnetization protection signal. Above the threshold value of the current mirror, the current mirror is active and supplies the output current which is a mirrored input current. The input current represents the feedback information.
These and other aspects of the invention are apparent from and will be elucidated with reference to the embodiments described hereinafter.